import 'package:data/response/article_response.dart';
import 'package:domain/model/article_domain_model.dart';

extension ArticleDomainModelMapper on ArticleResponse {
  ArticleDomainModel toDomainModel() {
    return ArticleDomainModel(
      id: id?.toString() ?? "",
      title: title ?? "",
      author: author ?? "",
      publishDate: niceDate ?? "",
      category: superChapterName ?? "",
      categoryId: superChapterId?.toString() ?? "",
    );
  }
}
